/**
	*****************************************************************************
	* @file     cmem7_rtc.h
	*
	* @brief    CMEM7 RTC header file
	*
	*
	* @version  V1.0
	* @date     3. September 2013
	*
	* @note               
	*           
	*****************************************************************************
	* @attention
	*
	* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
	* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
	* TIME. AS A RESULT, CAPITAL-MICRO SHALL NOT BE HELD LIABLE FOR ANY DIRECT, 
	* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
	* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
	* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
	*
	* <h2><center>&copy; COPYRIGHT 2013 Capital-micro </center></h2>
	*****************************************************************************
	*/
	
#ifndef __CMEM7_RTC_H
#define __CMEM7_RTC_H

#ifdef __cplusplus
 extern "C" {
#endif

#include "cmem7.h"
#include "cmem7_conf.h"

#define RTC_Int_Second                     ((uint32_t)0x00000001)
#define RTC_Int_Microsecond                ((uint32_t)0x00000002)
#define RTC_Int_All                        ((uint32_t)0x00000003)
#define IS_RTC_INT(INT)                    (((INT) & ~RTC_Int_All) == 0)


void RTC_EnableInt(uint32_t Int, BOOL Enable);
BOOL RTC_GetIntStatus(uint32_t Int);
void RTC_ClearInt(uint32_t Int);
uint32_t RTC_GetSecond(void);
uint16_t RTC_GetMicroSecond(void);
void RTC_SetSecond(uint32_t s);
void RTC_SetMicroSecond(uint16_t ms);
void RTC_DelayS(uint8_t s);
void RTC_DelayMs(uint8_t ms);

#ifdef __cplusplus
}
#endif

#endif /* __CMEM7_RTC_H */

